public class Threadtest2 {
    public static void main(String[] args)throws InterruptedException {

        Thread thread = new Thread(()->
        {
            System.out.println(Thread.currentThread().getName()+" is working");
        },"Lisi");
        Thread thread2 = new Thread(()->
        {
            System.out.println(Thread.currentThread().getName()+" is coming!");
        },"Wangwu");
        thread.start();
        thread.join();
        System.out.println(thread.getName()+" is ending... ");
        thread2.start();
        thread2.join();
        System.out.println(thread2.getName()+" is ending too...");

    }
}
